Skip to content

feat: unified download progress with cross-layer progress events - #113

Merged
AnnChord merged 18 commits into
masterfrom
feat/unified-download-progress
Jun 22, 2026
Merged

feat: unified download progress with cross-layer progress events#113
AnnChord merged 18 commits into
masterfrom
feat/unified-download-progress

Conversation

@AnnChord

@AnnChord AnnChord commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a unified download abstraction layer across Rust/Java/TypeScript with real-time progress eventing. JDK/JRE and driver downloads now show circular progress indicators in both the connection dialog and the settings page. Additionally, add "Check for Updates" functionality for JRE runtime and JDBC drivers, fix driver download URL resolution, and fill missing database type mappings.

Changes

Rust Backend

  • New download module (src-tauri/src/download/mod.rs): Generic download abstraction with progress callbacks, timeout support, and Maven artifact resolution
  • JDBC bridge integration: Refactored download.rs, jre.rs, launcher.rs to use the centralized download module for all binary/artifact downloads
  • Command extensions: Extended commands/jdbc.rs with progress-aware command handlers and registered the new module
  • Driver check-update (commands/jdbc.rs): New check_driver_update command with DriverUpdateStatus — checks Maven Central for latest version, supports both Maven artifacts and direct download URLs (HEAD + Content-Length comparison)
  • download_jdbc_driver_direct fix (download.rs): Replaced literal "latest" with dynamic Maven metadata resolution — fetches <latest> from maven-metadata.xml. Added download_url path for non-Maven drivers (e.g. GBase 8a). Priority: download_url > version_cap > metadata
  • Missing type mappings: Added tdengine, yashandb, kingbasees, oceanbase_oracle to parse_db_type in jdbc.rs and OceanbaseOracle to db_type_to_registry_key in registry.rs

Java Bridge

  • Progress events: Added download progress event emission from BridgeMain, DriverResolver, and ProtocolHandler — reports phase transitions, byte-level progress, and errors back to Rust via stdout protocol

TypeScript/Frontend

  • Download event composable (useDownloadEvents.ts): Shared composable that listens to Tauri progress events and exposes reactive download state (progress, complete, error) — safe for concurrent component usage
  • Connection dialog progress: ServerFormDialog now shows circular download progress during JRE resolution and JDBC driver download, with loading states on the test/connect button
  • JRE/Driver settings: jre-driver-section.vue shows download progress per component with real-time percentage indicators
  • App updater progress (useAppUpdater.ts, SettingsPage.vue): Added downloadProgress computed from DownloadEvent, circular progress ring during update download, auto-download on check
  • JRE check-update UI: Spinning update icon on JRE card — handleCheckJreUpdates shows toast (up-to-date / update available) and auto-downloads with progress
  • Driver check-update UI: Per-driver update icon (disabled when not installed) — handleCheckDriverUpdates shows toast and auto-downloads. Bridge JAR gate on driver download with friendly toast
  • i18n: Added notifications block (upToDate, updateAvailable, downloadSuccess, installBridgeFirst, etc.) and actions.checkUpdates to jreCard/bridgeCard/driversCard for both enUS and zhCN

Build

  • Removed unused dependencies from package-lock.json

Driver Audit

  • All 26 JdbcBridge database types cross-referenced between drivers.tomlregistry.rsjdbc.rsstate.rs — no gaps remain
  • GBase 8a download_url verified reachable (HTTP 200, 603KB)

Architecture

Rust download module (progress callbacks) -> Tauri events (download-progress) -> useDownloadEvents composable (reactive state) -> Connection dialog / Settings page (UI progress bars)

Java bridge emits progress events via stdout protocol: BridgeMain/DriverResolver/ProtocolHandler -> stdout JSON progress messages -> Rust JDBC bridge parses -> Tauri events

Driver check-update: Frontend button click -> check_driver_update Tauri command -> HTTP HEAD/Maven metadata query -> DriverUpdateStatus response -> toast + auto-download with progress

AnnChord and others added 18 commits June 22, 2026 18:14
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Replace inline download logic with the centralized download module. The JDBC bridge now uses the generic download module for Maven artifact downloads, JRE version resolution, and bridge binary downloads.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Register the download module in lib.rs and extend the JDBC command handlers to use the new download module for artifact downloads and progress reporting.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Emit download progress events from the JDBC bridge process during JRE resolution and driver artifact downloads. Includes protocol buffer for progress messages and updated driver resolver.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add useDownloadEvents composable that listens to Tauri download-progress events and exposes reactive state for download progress, completion, and errors across components.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Integrate download progress UI into the server connection dialog and the JRE/Driver settings section. Shows real-time progress bars for JRE and driver downloads with error handling.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add check_driver_update Tauri command that checks Maven Central for latest driver version, supporting both Maven and download_url drivers. Includes DriverUpdateStatus struct, parse_maven_latest_version helper, and adds missing driver type mappings (TDengine, YashanDB, KingbaseES, OceanbaseOracle) to parse_db_type and db_type_to_registry_key.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add DriverUpdateStatus type with current_version, latest_version, update_available fields, and checkDriverUpdate method on the jdbcApi object. Re-export DriverUpdateStatus from datasources/index.ts.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Fix download_jdbc_driver_direct to resolve latest version from Maven metadata XML instead of using literal 'latest' (which returns 404 for 20+ drivers). Add download_url path for non-Maven drivers (e.g. GBase 8a) that bypasses Maven resolution entirely. Version resolution priority: download_url > version_cap > maven-metadata.xml.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add notifications block (upToDate, updateAvailable, newVersion, downloadSuccess, etc.) and actions.checkUpdates label to jreCard, bridgeCard, and driversCard sections for both enUS and zhCN locales.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add spinning update icon and handleCheckJreUpdates/handleCheckDriverUpdates functions with toast notifications and auto-download. Gate driver download on bridge JAR being installed. Show success toasts on download/remove for JRE, bridge, and drivers.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add downloadProgress computed from DownloadEvent in useAppUpdater composable. Replace spinner icon with circular progress ring during download in SettingsPage.vue. Auto-start download when check finds an update available.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Formatting-only changes from cargo fmt across commands/ and connection/ modules.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Formatting-only changes from cargo fmt across connection handle/impl and database adapters (clickhouse, mysql, postgres, rqlite, sqlite, turso, http_sql, strategy, config).

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Formatting-only changes from cargo fmt.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Formatting-only changes from cargo fmt across jdbc_bridge submodules (adapter, fallback, jre, launcher, mod, tns_parser).

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@AnnChord
AnnChord merged commit d24941b into master Jun 22, 2026
3 checks passed
@AnnChord
AnnChord deleted the feat/unified-download-progress branch June 22, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant